//
//  ZAYPFfFeedBackViewController.swiftfpTxAb
//  QRScan
//
//  Created by Qiang on 2018/4/6.
//  Copyright © 2018年 Qiang. All rights reserved.
//

import UIKit

class ZAYPFfFeedBackViewController: UIViewController {

    @IBOutlet weak var textView: UITextView!
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.textView.becomeFirstResponder()
        self.textView.layer.cornerRadius = 5
        self.textView.layer.borderColor = UIColor.init(red: 54, green: 88, blue: 138, alpha: 1).cgColor
        self.textView.layer.borderWidth = 1
    }
    @IBAction func Click(_ sender: Any) {
        if self.textView.text.count==0 {
            let alert = UIAlertController(title: "alert", message: "The input content can not be empty！", preferredStyle: .alert)
            let action = UIAlertAction(title: "OK", style: .cancel) { (alert) in
                
            }
            alert.addAction(action)
            self.present(alert, animated: true, completion: nil)
            return
        }
        let alert = UIAlertController(title: "success", message: "We have received your feedback！", preferredStyle: .alert)
        let action = UIAlertAction(title: "OK", style: .cancel) { (alert) in
            
        }
        alert.addAction(action)
        self.present(alert, animated: true, completion: nil)
    }
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        self.view.endEditing(true)
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
